package com.yt.lxh.common.utils;

import com.yt.lxh.model.acl.Admin;

public class AuthContextUtil {
    //创建ThreadLocal对象
    private static final ThreadLocal<Admin> threadLocal = new ThreadLocal<>();
    //添加数据
    public static void set(Admin admin){
        threadLocal.set(admin);
    }
    //获取数据
    public static Admin get(){
        return threadLocal.get();
    }
    //删除数据
    public static void remove(){
        threadLocal.remove();
    }

}
